GetControlData
NEW WITH THE APPEARANCE MANAGER
Gets control-specific data.
pascal OSErr GetControlData ( ControlHandle inControl, ControlPartCode inPart, ResType inTagName, Size inBufferSize, Ptr inBuffer, Size *outActualSize);
inControl
- On input, a handle to the specified control.
inPart
- The part code of the control part whose control-specific data you wish to set; see "Control Part Code Constants". Passing
kControlEntireControl
indicates that either the control has no parts or the data is not tied to any specific part of the control.inTagName
- A constant representing the control-specific data you wish to get; see "Control Data Tag Constants".
inBufferSize
- The size (in bytes) of the data pointed to by the
inBuffer
parameter. For variable-length control data, pass the value returned in theoutMaxSize
parameter ofGetControlDataSize
in theinBufferSize
parameter. The number of bytes must match the actual data size.inBuffer
- On input, a pointer to a buffer allocated by your application. On output, a copy of the control-specific data. If you pass
nil
on input, it is equivalent to callingGetControlDataSize
. The actual size of the control-specific data will be returned in theoutActualSize
parameter. For variable-length data, the number of bytes must match the actual data size.outActualSize
- On output, a pointer to the actual size of the data.
- function result
- A result code; see "Result Codes". The result code
errDataNotSupported
indicates that theinTagName
parameter is not valid. The result codeerrDataSizeMismatch
indicates that the value in theinBufferSize
parameter does not match the value in theoutActualSize
parameter.DISCUSSION
TheGetControlData
function will only copy the amount of data specified in theinBufferSize
parameter, but will tell you the actual size of the buffer so you will know if the data was truncated.SEE ALSO
SetControlData
."Appearance Manager Gestalt Selector Constants".